#version 330 core

layout (location = 0) in vec2 pos;
layout (location = 1) in vec2 center;
layout (location = 2) in vec2 radius;
layout (location = 3) in vec4 color;

uniform mat4 m = mat4(1.0);
uniform mat4 vp = mat4(1.0);

out DATA
{
    vec2 pos;
    vec2 center;
    vec2 radius;
    vec4 color;
} vs_out;


void main() 
{
    vs_out.pos = (vp * m * vec4(pos, 0.0, 1.0)).xy;
    vs_out.center = (vp * m * vec4(center, 0.0, 1.0)).xy;
    vs_out.radius = (vp * m * vec4(radius, 0.0, 0.0)).xy;
    vs_out.color = color;
    gl_Position = vp * m * vec4(pos, 0.0, 1.0);
}
